Integrand size = 22, antiderivative size = 221 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f^2 p x+\frac {4 d f g p x}{3 e}-\frac {2 d^2 g^2 p x}{5 e^2}-\frac {4}{9} f g p x^3+\frac {2 d g^2 p x^3}{15 e}-\frac {2}{25} g^2 p x^5+\frac {2 \sqrt {d} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {4 d^{3/2} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right ) \]
[Out]
Time = 0.10 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2521, 2498, 327, 211, 2505, 308} \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {4 d^{3/2} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+\frac {2 \sqrt {d} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {2 d^2 g^2 p x}{5 e^2}+\frac {4 d f g p x}{3 e}+\frac {2 d g^2 p x^3}{15 e}-2 f^2 p x-\frac {4}{9} f g p x^3-\frac {2}{25} g^2 p x^5 \]
[In]
[Out]
Rule 211
Rule 308
Rule 327
Rule 2498
Rule 2505
Rule 2521
Rubi steps \begin{align*} \text {integral}& = \int \left (f^2 \log \left (c \left (d+e x^2\right )^p\right )+2 f g x^2 \log \left (c \left (d+e x^2\right )^p\right )+g^2 x^4 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx \\ & = f^2 \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx+(2 f g) \int x^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g^2 \int x^4 \log \left (c \left (d+e x^2\right )^p\right ) \, dx \\ & = f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right )-\left (2 e f^2 p\right ) \int \frac {x^2}{d+e x^2} \, dx-\frac {1}{3} (4 e f g p) \int \frac {x^4}{d+e x^2} \, dx-\frac {1}{5} \left (2 e g^2 p\right ) \int \frac {x^6}{d+e x^2} \, dx \\ & = -2 f^2 p x+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right )+\left (2 d f^2 p\right ) \int \frac {1}{d+e x^2} \, dx-\frac {1}{3} (4 e f g p) \int \left (-\frac {d}{e^2}+\frac {x^2}{e}+\frac {d^2}{e^2 \left (d+e x^2\right )}\right ) \, dx-\frac {1}{5} \left (2 e g^2 p\right ) \int \left (\frac {d^2}{e^3}-\frac {d x^2}{e^2}+\frac {x^4}{e}-\frac {d^3}{e^3 \left (d+e x^2\right )}\right ) \, dx \\ & = -2 f^2 p x+\frac {4 d f g p x}{3 e}-\frac {2 d^2 g^2 p x}{5 e^2}-\frac {4}{9} f g p x^3+\frac {2 d g^2 p x^3}{15 e}-\frac {2}{25} g^2 p x^5+\frac {2 \sqrt {d} f^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {\left (4 d^2 f g p\right ) \int \frac {1}{d+e x^2} \, dx}{3 e}+\frac {\left (2 d^3 g^2 p\right ) \int \frac {1}{d+e x^2} \, dx}{5 e^2} \\ & = -2 f^2 p x+\frac {4 d f g p x}{3 e}-\frac {2 d^2 g^2 p x}{5 e^2}-\frac {4}{9} f g p x^3+\frac {2 d g^2 p x^3}{15 e}-\frac {2}{25} g^2 p x^5+\frac {2 \sqrt {d} f^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {4 d^{3/2} f g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2}{3} f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g^2 x^5 \log \left (c \left (d+e x^2\right )^p\right ) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.68 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {30 \sqrt {d} \left (15 e^2 f^2-10 d e f g+3 d^2 g^2\right ) p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )+\sqrt {e} x \left (-2 p \left (45 d^2 g^2-15 d e g \left (10 f+g x^2\right )+e^2 \left (225 f^2+50 f g x^2+9 g^2 x^4\right )\right )+15 e^2 \left (15 f^2+10 f g x^2+3 g^2 x^4\right ) \log \left (c \left (d+e x^2\right )^p\right )\right )}{225 e^{5/2}} \]
[In]
[Out]
Time = 1.49 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.76
method | result | size |
parts | \(\frac {g^{2} x^{5} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{5}+\frac {2 f g \,x^{3} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{3}+f^{2} x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {2 p e \left (\frac {\frac {3}{5} e^{2} g^{2} x^{5}-d e \,g^{2} x^{3}+\frac {10}{3} e^{2} f g \,x^{3}+3 d^{2} g^{2} x -10 d e f g x +15 e^{2} f^{2} x}{e^{3}}-\frac {d \left (3 g^{2} d^{2}-10 d e f g +15 e^{2} f^{2}\right ) \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{e^{3} \sqrt {d e}}\right )}{15}\) | \(167\) |
risch | \(\frac {\ln \left (c \right ) g^{2} x^{5}}{5}+x \ln \left (c \right ) f^{2}-\frac {i \pi f g \,x^{3} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{3}+\frac {2 \sqrt {-d e}\, p \ln \left (\sqrt {-d e}\, x +d \right ) d f g}{3 e^{2}}-\frac {2 \sqrt {-d e}\, p \ln \left (-\sqrt {-d e}\, x +d \right ) d f g}{3 e^{2}}-\frac {\sqrt {-d e}\, p \ln \left (\sqrt {-d e}\, x +d \right ) f^{2}}{e}+\frac {\sqrt {-d e}\, p \ln \left (-\sqrt {-d e}\, x +d \right ) f^{2}}{e}+\frac {i x \pi \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{2}-\frac {i \pi \,g^{2} x^{5} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{10}-\frac {i x \pi \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{2}+\frac {2 \ln \left (c \right ) f g \,x^{3}}{3}-\frac {i \pi \,g^{2} x^{5} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{10}-\frac {i x \pi \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i x \pi \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}+\frac {i \pi \,g^{2} x^{5} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{10}+\frac {i \pi \,g^{2} x^{5} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{10}-\frac {i \pi f g \,x^{3} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{3}-\frac {\sqrt {-d e}\, p \ln \left (\sqrt {-d e}\, x +d \right ) g^{2} d^{2}}{5 e^{3}}+\frac {\sqrt {-d e}\, p \ln \left (-\sqrt {-d e}\, x +d \right ) g^{2} d^{2}}{5 e^{3}}+\frac {i \pi f g \,x^{3} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{3}+\frac {i \pi f g \,x^{3} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{3}+\left (\frac {1}{5} g^{2} x^{5}+\frac {2}{3} f g \,x^{3}+f^{2} x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {4 d f g p x}{3 e}-2 f^{2} p x -\frac {2 g^{2} p \,x^{5}}{25}-\frac {2 d^{2} g^{2} p x}{5 e^{2}}+\frac {2 d \,g^{2} p \,x^{3}}{15 e}-\frac {4 f g p \,x^{3}}{9}\) | \(686\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 404, normalized size of antiderivative = 1.83 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\left [-\frac {18 \, e^{2} g^{2} p x^{5} + 10 \, {\left (10 \, e^{2} f g - 3 \, d e g^{2}\right )} p x^{3} - 15 \, {\left (15 \, e^{2} f^{2} - 10 \, d e f g + 3 \, d^{2} g^{2}\right )} p \sqrt {-\frac {d}{e}} \log \left (\frac {e x^{2} + 2 \, e x \sqrt {-\frac {d}{e}} - d}{e x^{2} + d}\right ) + 30 \, {\left (15 \, e^{2} f^{2} - 10 \, d e f g + 3 \, d^{2} g^{2}\right )} p x - 15 \, {\left (3 \, e^{2} g^{2} p x^{5} + 10 \, e^{2} f g p x^{3} + 15 \, e^{2} f^{2} p x\right )} \log \left (e x^{2} + d\right ) - 15 \, {\left (3 \, e^{2} g^{2} x^{5} + 10 \, e^{2} f g x^{3} + 15 \, e^{2} f^{2} x\right )} \log \left (c\right )}{225 \, e^{2}}, -\frac {18 \, e^{2} g^{2} p x^{5} + 10 \, {\left (10 \, e^{2} f g - 3 \, d e g^{2}\right )} p x^{3} - 30 \, {\left (15 \, e^{2} f^{2} - 10 \, d e f g + 3 \, d^{2} g^{2}\right )} p \sqrt {\frac {d}{e}} \arctan \left (\frac {e x \sqrt {\frac {d}{e}}}{d}\right ) + 30 \, {\left (15 \, e^{2} f^{2} - 10 \, d e f g + 3 \, d^{2} g^{2}\right )} p x - 15 \, {\left (3 \, e^{2} g^{2} p x^{5} + 10 \, e^{2} f g p x^{3} + 15 \, e^{2} f^{2} p x\right )} \log \left (e x^{2} + d\right ) - 15 \, {\left (3 \, e^{2} g^{2} x^{5} + 10 \, e^{2} f g x^{3} + 15 \, e^{2} f^{2} x\right )} \log \left (c\right )}{225 \, e^{2}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 478 vs. \(2 (231) = 462\).
Time = 31.58 (sec) , antiderivative size = 478, normalized size of antiderivative = 2.16 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\begin {cases} \left (f^{2} x + \frac {2 f g x^{3}}{3} + \frac {g^{2} x^{5}}{5}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\\left (f^{2} x + \frac {2 f g x^{3}}{3} + \frac {g^{2} x^{5}}{5}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- 2 f^{2} p x + f^{2} x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {4 f g p x^{3}}{9} + \frac {2 f g x^{3} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3} - \frac {2 g^{2} p x^{5}}{25} + \frac {g^{2} x^{5} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{5} & \text {for}\: d = 0 \\\frac {2 d^{3} g^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{5 e^{3} \sqrt {- \frac {d}{e}}} - \frac {d^{3} g^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{5 e^{3} \sqrt {- \frac {d}{e}}} - \frac {4 d^{2} f g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {2 d^{2} f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} - \frac {2 d^{2} g^{2} p x}{5 e^{2}} + \frac {2 d f^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {4 d f g p x}{3 e} + \frac {2 d g^{2} p x^{3}}{15 e} - 2 f^{2} p x + f^{2} x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {4 f g p x^{3}}{9} + \frac {2 f g x^{3} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3} - \frac {2 g^{2} p x^{5}}{25} + \frac {g^{2} x^{5} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{5} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.79 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {1}{25} \, {\left (2 \, g^{2} p - 5 \, g^{2} \log \left (c\right )\right )} x^{5} - \frac {2 \, {\left (10 \, e f g p - 3 \, d g^{2} p - 15 \, e f g \log \left (c\right )\right )} x^{3}}{45 \, e} + \frac {1}{15} \, {\left (3 \, g^{2} p x^{5} + 10 \, f g p x^{3} + 15 \, f^{2} p x\right )} \log \left (e x^{2} + d\right ) - \frac {{\left (30 \, e^{2} f^{2} p - 20 \, d e f g p + 6 \, d^{2} g^{2} p - 15 \, e^{2} f^{2} \log \left (c\right )\right )} x}{15 \, e^{2}} + \frac {2 \, {\left (15 \, d e^{2} f^{2} p - 10 \, d^{2} e f g p + 3 \, d^{3} g^{2} p\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{15 \, \sqrt {d e} e^{2}} \]
[In]
[Out]
Time = 0.00 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.87 \[ \int \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (f^2\,x+\frac {2\,f\,g\,x^3}{3}+\frac {g^2\,x^5}{5}\right )-x\,\left (2\,f^2\,p-\frac {d\,\left (\frac {4\,f\,g\,p}{3}-\frac {2\,d\,g^2\,p}{5\,e}\right )}{e}\right )-x^3\,\left (\frac {4\,f\,g\,p}{9}-\frac {2\,d\,g^2\,p}{15\,e}\right )-\frac {2\,g^2\,p\,x^5}{25}+\frac {2\,\sqrt {d}\,p\,\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e}\,p\,x\,\left (3\,d^2\,g^2-10\,d\,e\,f\,g+15\,e^2\,f^2\right )}{3\,p\,d^3\,g^2-10\,p\,d^2\,e\,f\,g+15\,p\,d\,e^2\,f^2}\right )\,\left (3\,d^2\,g^2-10\,d\,e\,f\,g+15\,e^2\,f^2\right )}{15\,e^{5/2}} \]
[In]
[Out]